package com.dongjiantong.quarantine.enums;

/**
 * Created by mz on 26/12/17.
 *
 */
public enum SupervisionRecordStatus {

    UNCOMMITTED(0,"未提交"),
    PENDING(1,"待处理"),
    CONFIRMED(2,"已确认");


    private final Integer value;
    private final String description;

    SupervisionRecordStatus(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public static SupervisionRecordStatus from(Integer value) {
        for (SupervisionRecordStatus supervisionRecordStatus : SupervisionRecordStatus.values()) {
            if (supervisionRecordStatus.value.equals(value)) {
                return supervisionRecordStatus;
            }
        }
        return null;
    }

    public Integer value() {
        return this.value;
    }

    @Override
    public String toString() {
        return description;
    }
}
